<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>상인등록</title>
<style type="text/css">

</style>
<link href="/Jangdolbaeng2/css/customer/common1.css" rel="stylesheet">
<link href="/Jangdolbaeng2/css/bootstrap.min.css" rel="stylesheet">
<link href="/Jangdolbaeng2/css/customer/common.css" rel="stylesheet">
<script src="/Jangdolbaeng2/js/jquery-1.11.1.js"></script>
<script src="/Jangdolbaeng2/js/bootstrap.min.js"></script>
<script type="text/javascript">
function formCheck()
{
	var id = $('#id').val();
	
	if(id == '' )
	{
		alert('아이디를 입력하시오');
		return false;
	}
	
	if(confirm('가입하시겠습니까?'))
	{
		return true;
	}
	
	return false;
}

function zipcodeOpen()
{
	window.open("goZipcodeForm.action", "zipcodewin", "top=200, left=300, width=600, height=500, resizable=no");	
}

function zipcodeOpen2()
{
	window.open("goZipcodeForm2.action", "zipcodewin2", "top=200, left=300, width=600, height=500, resizable=no");	
}

</script>
</head>
<body>
	<div id="header">
		<%@ include file="adminHeader.jsp" %>
	</div>
	<div class="container" align="center">
		<h3 align="center" style="margin-top: 50px; margin-bottom: 20px;"><span class="glyphicon glyphicon-list-alt"></span> <span style="font-family: anew">상인회원등록</span></h3>
			<div class="row">				
				<s:form name="adminJoin" action="join" theme="simple" onsubmit="return formCheck()">	
					<table class="table table-striped table-hover table-bordered" style="text-align: center; width: 400px;">
						<tr>
							<td style="width: 150px; font-weight: bold;">이름</td>
							<td><s:textfield id="name" name="sellerVO.name" style="width: 250px;"/></td>
						</tr>
						<tr>
							<td style="width: 150px; font-weight: bold;">아이디</td>
							<td>
							<s:textfield id="id" name="sellerVO.seller_id" style="width: 250px;"/>
							<s:hidden name="product_seq" value="%{product_seq}" />
							</td>
						</tr>
						<tr>
							<td style="width: 150px; font-weight: bold;">비밀번호</td>
							<td><s:password id="password1" name="sellerVO.password" style="width: 250px;"/></td>
						</tr>
						<tr>
							<td style="width: 150px; font-weight: bold;">비밀번호확인</td>
							<td><s:password id="password1" style="width: 250px;"/></td>
						</tr>
						<tr>
							<td style="width: 150px; font-weight: bold;">우편번호</td>
							<td><span style="display: inline-block"><s:textfield id="zipcode" name="sellerVO.zipcode" style="width: 250px;"/>
								<button type="button" class="btn btn-default btn-block" onclick="javascript:zipcodeOpen()" style="width: 250px; padding: 0; background-color: #62943D;"><span style="color: white;">우편번호검색</span></button>	
								</span>
							</td>				
						</tr>
						<tr>
							<td style="width: 150px; font-weight: bold;">주소</td>
							<td><s:textfield id="address1" name="sellerVO.address1" style="width: 250px;"/></td>
						</tr>
						<tr>	
							<td style="width: 150px; font-weight: bold;">상세주소</td>
							<td><s:textfield id="address2" name="sellerVO.address2" style="width: 250px;"/></td>
						</tr>
						<tr>
							<td style="width: 150px; font-weight: bold;">연락처</td>
							<td><s:textfield id="phone" name="sellerVO.phone" style="width: 250px;"/></td>
						</tr>
						<tr>
							<td style="width: 150px; font-weight: bold;">E-mail</td>
							<td><s:textfield id="email" name="sellerVO.email" style="width: 250px;"/></td>
						</tr>
					</table>
					
					<!-- 아래는 상점가입폼입니다. -->
				<h3 align="center" style="margin-top: 50px; margin-bottom: 20px;"><span class="glyphicon glyphicon-home"></span> <span style="font-family: anew">상점등록</span></h3>
					<table class="table table-striped table-hover table-bordered"  style="text-align: center; width: 400px;">
						<tr>
							<td style="width: 150px; font-weight: bold;">상점이름</td>
							<td><s:textfield id="shopname" name="shopVO.name" style="width: 250px;"/></td>
						</tr>
						<tr>
							<td style="width: 150px; font-weight: bold;">상품카테고리</td>				
							<td>
								<s:select id="shopcategory" name="shopVO.category" list="#{'f':'과일류', 'v':'채소류', 'i':'생선류', 'm':'육류', 'g':'식료품류', 'h':'건강용품', 'a':'패션', 'l':'생활용품', 'e':'기타'}" style="width:100px;" />
							</td> 
						</tr>
						<tr>
							<td style="width: 150px; font-weight: bold;">상점우편번호</td>
							<td><span style="display: inline-block"><s:textfield id="shopzipcode" name="shopVO.zipcode" style="width: 250px;"/>
								<button type="button" class="btn btn-default btn-block" onclick="javascript:zipcodeOpen2()" style="width: 250px; padding: 0; background-color: #62943D;"><span style="color: white;">우편번호검색</span></button>	
								</span>
							</td>				
						</tr>
						<tr>
							<td style="width: 150px; font-weight: bold;">상점주소</td>
							<td><s:textfield id="shopaddress1" name="shopVO.address1" style="width: 250px;"/></td>
						</tr>
						<tr>	
							<td style="width: 150px; font-weight: bold;">상점상세주소</td>
							<td><s:textfield id="shopaddress2" name="shopVO.address2" style="width: 250px;"/></td>
						</tr>
						<tr>
							<td style="width: 150px; font-weight: bold;">상점전화번호</td>
							<td><s:textfield id="shopphone" name="shopVO.phone" style="width: 250px;"/></td>
						</tr>
					</table>
						<button type="submit" class="btn btn-default" style="width: 300px; background-color: #62943D;"><span style="color: white;">등록</span></button>				
				</s:form>
		</div><!-- end of row -->
	</div><!-- end of container -->	
</body>
</html>

